package com.quxue.im.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 好友表
 * </p>
 *
 * @author jinken
 * @since 2023-11-13
 */
@TableName("chat_friend")
@Accessors(chain = true) // 链式调用
public class ChatFriend implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 用户id
     */
    private Long fromId;

    /**
     * 好友id
     */
    private Long toId;

    /**
     * 备注
     */
    private String remark;

    /**
     * 黑名单
     */
    private String black;

    /**
     * 好友来源
     */
    private String source;

    /**
     * 是否置顶
     */
    private String top;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getFromId() {
        return fromId;
    }

    public void setFromId(Long fromId) {
        this.fromId = fromId;
    }

    public Long getToId() {
        return toId;
    }

    public void setToId(Long toId) {
        this.toId = toId;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getBlack() {
        return black;
    }

    public void setBlack(String black) {
        this.black = black;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public String getTop() {
        return top;
    }

    public void setTop(String top) {
        this.top = top;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return "ChatFriend{" +
            "id = " + id +
            ", fromId = " + fromId +
            ", toId = " + toId +
            ", remark = " + remark +
            ", black = " + black +
            ", source = " + source +
            ", top = " + top +
            ", createTime = " + createTime +
        "}";
    }
}
